package com.util.utillib.extend

import org.json.JSONArray

fun List<String>.deepCopy(): List<String> {
    return this.toMutableList().toList()
}

fun JSONArray.toStringList(): List<String> {
    val list = mutableListOf<String>()
    for (index in 0 until this.length()) {
        val item = this[index]
        if (item is String) {
            list.add(item)
        }
    }
    return list
}
